package com.lmt_15;

import com.lmt_16.Account;

public class MyThread extends Thread {
    private Account acc;
    public MyThread (Account account, String name){  // 在构造函数中设置线程名
        super(name);
        this.acc = account;
    }
    public MyThread(){

    }
    @Override
    public void run() {
        super.run();
        Thread m = Thread.currentThread();
        acc.drawmoney(m.getName());
    }
}
